package cn.psvmc.cxzapi.model.system;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 角色表
 * @Author auto
 * @Date 2024-08-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("t_role")
public class TRole implements Serializable {

    //角色id
    @TableId(value = "roleid", type = IdType.AUTO)
    private Integer roleid;

    //角色名称
    @TableField("rolename")
    private String rolename;

    //角色类型（0普通角色1内置角色）
    @TableField("roletype")
    private Integer roletype;

    //角色说明
    @TableField("comm")
    private String comm;

    //商家id
    @TableField("storeid")
    private Integer storeid;

    //创建人id
    @TableField(value = "createid", fill = FieldFill.INSERT)
    private Integer createid;

    //创建时间
    @TableField(value = "createtime", fill = FieldFill.INSERT)
    private LocalDateTime createtime;

    //操作人id
    @TableField(value = "updateid", fill = FieldFill.INSERT_UPDATE)
    private Integer updateid;

    //操作时间
    @TableField(value = "updatetime", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatetime;

    //版本号
    @TableField("rversion")
    @Version
    private Integer rversion;

    //角色权限
    @TableField(exist = false)
    private List<TRoleMenu> menus;


}
